{% extends "base.html" %}

{% block content %}

<form method="POST" action="{% url YourSchool.exams.views.addExam %}">
    {% csrf_token %}

  <label for="name">Name of Exam:</label>
  <input type="text" name="name" id="name"/>
  <label for="details">Details:</label>
  <textarea cols="20" rows="5" name="details" id="details"></textarea>
  <label for="date_begin">Begin date:</label>
  <input type="text" name="date_begin" id="date_begin"/>
  <label for="date_end">End date:</label>
  <input type="text" name="date_end" id="date_end"/>

 {% for i in 0123456789|make_list %}
    <table>
    <tbody>

  <tr>
    <label for="question_{{i}}">Question {{i}}:</label>
    <input type="text" name="question_{{i}}" id="question_{{i}}"/>
  </tr>
    {% for x in 1234|make_list %}
        <tr>
            <label for="question_{{i}}_{{x}}">Answer {{x}}:</label>
            <input type="text" name="question_{{i}}_{{x}}" id="question_{{i}}_{{x}}"/>
        </tr>
        <tr>
            <input type="radio" value="{{x}}" name="question_{{i}}_{{i}}_{{i}}"/>

        </tr>

    {% endfor %}

    </tbody>
    </table>

{% endfor %}

        <input type="submit" value="submit"/>
   </form>
{% endblock content %}
